<%@page pageEncoding="UTF-8" contentType="text/html; utf-8" isELIgnored="false" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
    <meta name="description" content="description of your site" />
    <meta name="author" content="author of the site" />
    <title>电商平台后台首页</title>
    <link rel="stylesheet" href="../css/bootstrap.css" />
    <link rel="stylesheet" href="../css/bootstrap-responsive.css" />
    <link rel="stylesheet" href="../css/styles.css" />
    <link rel="stylesheet" href="../css/toastr.css" />
    <link rel="stylesheet" href="../css/fullcalendar.css" />
    <script src="../js/jquery.min.js"></script>
    <script src="../js/bootstrap.js"></script>
    <script src="../js/jquery.knob.js"></script>
    <script src="http://d3js.org/d3.v3.min.js"></script>
    <script src="../js/jquery.sparkline.min.js"></script>
    <script src="../js/toastr.js"></script>
    <script src="../js/jquery.tablesorter.min.js"></script>
    <script src="../js/jquery.peity.min.js"></script>
    <script src="../js/fullcalendar.min.js"></script>
    <script src="../js/gcal.js"></script>
    <script src="../js/setup.js"></script>
</head>
<body>
<!-- header部分 -->
<%@include file="../header.jsp"%>
<!-- End header -->
<div class="page">
    <div class="page-container">
        <div class="container">
            <div class="row">
                <div class="span12">
                    <a href="#newUserModal" data-toggle="modal" class="btn pull-right">添加新商品</a>
                    <h4 class="header">商品列表</h4>
                    <form action="search_product_simple_complete.html" method="post">
                        <input type="text" name="keywords" class="form-control" placeholder="请输入搜索关键字">&nbsp;
                        <input class="btn btn-info" type="submit" value="搜索">
                    </form>
                    <table class="table table-striped sortable">
                        <thead>
                        <tr>
                            <th>商品ID</th>
                            <th>商品名称</th>
                            <th>商品描述</th>
                            <th>普通价格</th>
                            <th>会员价格</th>
                            <th>上架日期</th>
                            <th>所属类别</th>
                        </tr>
                        </thead>
                        <tbody>


                        <tr>
                            <td>1</td>
                            <td>手机</td>
                            <td>手机</td>
                            <td>2988.00</td>
                            <td>2688.00</td>
                            <td>2018-02-02</td>
                            <td>电子产品</td>
                            <td>
                                <div class="btn-group">
                                    <button class="btn">操作</button>
                                    <button data-toggle="dropdown" class="btn dropdown-toggle">
                                        <span class="caret"></span>
                                    </button>
                                    <ul class="dropdown-menu">
                                        <li><a href="#">修改</a> <a
                                                href="#">删除</a></li>
                                    </ul>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td>2</td>
                            <td>手机</td>
                            <td>手机</td>
                            <td>2988.00</td>
                            <td>2688.00</td>
                            <td>2018-02-02</td>
                            <td>电子产品</td>
                            <td>
                                <div class="btn-group">
                                    <button class="btn">操作</button>
                                    <button data-toggle="dropdown" class="btn dropdown-toggle">
                                        <span class="caret"></span>
                                    </button>
                                    <ul class="dropdown-menu">
                                        <li><a href="#">修改</a> <a
                                                href="#">删除</a></li>
                                    </ul>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td>3</td>
                            <td>手机</td>
                            <td>手机</td>
                            <td>2988.00</td>
                            <td>2688.00</td>
                            <td>2018-02-02</td>
                            <td>电子产品</td>
                            <td>
                                <div class="btn-group">
                                    <button class="btn">操作</button>
                                    <button data-toggle="dropdown" class="btn dropdown-toggle">
                                        <span class="caret"></span>
                                    </button>
                                    <ul class="dropdown-menu">
                                        <li><a href="#">修改</a> <a
                                                href="#">删除</a></li>
                                    </ul>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td>4</td>
                            <td>手机</td>
                            <td>手机</td>
                            <td>2988.00</td>
                            <td>2688.00</td>
                            <td>2018-02-02</td>
                            <td>电子产品</td>
                            <td>
                                <div class="btn-group">
                                    <button class="btn">操作</button>
                                    <button data-toggle="dropdown" class="btn dropdown-toggle">
                                        <span class="caret"></span>
                                    </button>
                                    <ul class="dropdown-menu">
                                        <li><a href="#">修改</a> <a
                                                href="#">删除</a></li>
                                    </ul>
                                </div>
                            </td>
                        </tr>

                        </tbody>
                    </table>
                    <div class="pagination pagination-centered">
                        <ul>
                            <li class="disabled"><a href="#">&laquo;</a></li>
                            <li class="active"><a href="#">1</a></li>
                            <li><a href="#">2</a></li>
                            <li><a href="#">3</a></li>
                            <li><a href="#">4</a></li>
                            <li><a href="#">5</a></li>
                            <li><a href="#">&raquo;</a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
        <div id="newUserModal" class="modal hide fade">
            <div class="modal-header">
                <button type="button" data-dismiss="modal" aria-hidden="true"
                        class="close">&times;</button>
                <h3>添加新商品</h3>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" action="add_product_do.jsp" method="post">
                    <div class="control-group">
                        <label for="inputEmail"  class="control-label">商品名称</label>
                        <div class="controls">
                            <input id="inputEmail" name="name" type="text" placeholder="请输入商品名称" />
                        </div>
                    </div>
                    <div class="control-group">
                        <label for="inputCurrentPassword"  class="control-label">商品描述
                        </label>
                        <div class="controls">
                            <input id="inputCurrentPassword" name="descr" type="text"
                                   placeholder="请输入商品描述" />
                        </div>
                    </div>
                    <div class="control-group">
                        <label for="inputCurrentPassword" class="control-label">普通价格
                        </label>
                        <div class="controls">
                            <input id="normalprice" name="normalprice" type="text"
                                   placeholder="普通价格" onblur="calMemberPrice()"/>
                        </div>
                    </div>
                    <div class="control-group">
                        <label for="inputCurrentPassword" class="control-label">会员价格
                        </label>
                        <div class="controls">
                            <input id="memberprice" type="text"
                                   placeholder="会员价格" />
                        </div>
                    </div>
                    <div class="control-group">
                        <label for="inputCurrentPassword" class="control-label">商品类别
                        </label>
                        <div class="controls">
                            <select name="categoryid">

                                <option value="1">电子产品</option>
                                <option value="2">食品</option>
                                <option value="3">服装</option>
                            </select>
                        </div>

                    </div>
                    <div class="modal-footer">
                        <a href="#" data-dismiss="modal" class="btn">关闭</a><input
                            type="submit" class="btn btn-primary"
                            value="添加商品" />
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<!--footer-->
<%@include file="../footer.jsp"%>
<!--end footer-->
</body>
<script src="js/d3-setup.js"></script>
<script>
    protocol = window.location.protocol === 'http:' ? 'ws://' : 'wss://';
    address = protocol + window.location.host + window.location.pathname
        + '/ws';
    socket = new WebSocket(address);
    socket.onmessage = function(msg) {
        msg.data == 'reload' && window.location.reload()
    }
</script>
</html>